<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>教师编辑</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="button/css/normalize.css" />
<link rel="stylesheet" type="text/css" href="button/css/vicons-font.css" />
<link rel="stylesheet" type="text/css" href="button/css/base.css" />
<link rel="stylesheet" type="text/css" href="button/css/buttons.css" />
<style type="text/css">
	.ttt{
	margin:auto;
		width: 300px;
		height: 200px;
		padding: 20px;
	}
	form p label{
	display: inline-block;
	width: 80px;
	text-align: right;
}
	input {
	padding: 6px;
}
	form  button{
		float: right;
}
	body {
	margin: 0;
	padding: 0;	
	background-image: linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
	min-height: 100vh;
}
	.from{
		margin: auto;

	}
	
</style>
<script type="text/javascript">
	function aaa(from){
		var name=from.name.value;
		var password=from.password.value;
		var username=from.username.value;
		if(name.length==0){
			alert("教师名称必填");
			return false;
		}
		if(password.length==0){
			alert("教师账号必填");
			return false;
		}
		if(username.length==0){
			alert("教师密码必填");
			return false;
		}
		return true;
	}
	function teacher(){
		window.location="teacher"
	}
</script>
</head>
<body>
<div class="ttt">
	<div class="form">
		<form action="teacher?method=save" method="post" onsubmit="return aaa(this)">
			<input type="hidden"  name="id" value="${model.id }">
			<p><label>教师名称：</label><input type="text" name="name" value="${model.name}"></p>
			<p><label>教师账号：</label><input type="text" name="username" value="${model.username }"></p>
			<p><label>教师密码：</label><input type="text" name="password" value="${model.password}"></p>
			<p>
			<button type="submit" class="button button--saqui button--inverted button--border-thin button--round-s" data-text="提交">提交</button>
	     	</p>
	     	<button type="reset" class="button button--saqui button--inverted button--border-thin button--round-s" data-text="重置">重置</button>
			<button onclick="teacher()" class="button button--wapasha button--round-s">返回</button></p>
		</form>
	</div>
</div>
</body>
</html>